(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     89958,       1810]
NotebookOptionsPosition[     89524,       1790]
NotebookOutlinePosition[     89934,       1808]
CellTagsIndexPosition[     89891,       1805]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
 RowBox[{
  RowBox[{"(*", " ", 
   RowBox[{
   "A", " ", "strategic", " ", "tax", " ", "competition", " ", "model", " ", 
    "with", " ", "heterogeneous", " ", "tax", " ", "base"}], " ", "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"Two", " ", "jurisdictions"}], ",", " ", 
    RowBox[{
     RowBox[{"population", " ", 
      RowBox[{"(", 
       RowBox[{"taxpayers", " ", "=", " ", "voters"}], ")"}], " ", 
      "heterogeneous", " ", "in", " ", "culture"}], "-", 
     RowBox[{"related", " ", "preference", " ", 
      RowBox[{"(", "cpref", ")"}], " ", "and", " ", "income", " ", 
      RowBox[{"(", "w", ")"}]}]}]}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"Two", " ", "periods"}], " ", "-", " ", 
    RowBox[{"3", " ", "stages"}]}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"-", " ", "Period"}], " ", "1"}], " ", "-", " ", 
     RowBox[{"stage", " ", "1"}]}], ":", " ", 
    RowBox[{
    "Majority", " ", "tax", " ", "rate", " ", "set", " ", "in", " ", "each", 
     " ", "jurisdiction", " ", "anticipating", " ", "all", " ", "subsequent", 
     " ", "stages", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"sorting", " ", "&"}], " ", "new", " ", "political", " ", 
       "equibilibrium"}], ")"}], " ", "and", " ", "taking", " ", "as", " ", 
     "given", " ", "the", " ", "tax", " ", "rate", " ", "of", " ", "the", " ",
      "other", " ", "jurisdiction", " ", 
     RowBox[{"(", 
      RowBox[{"Nash", " ", "equilibirum"}], ")"}]}]}], " ", "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"-", " ", "Period"}], " ", "1"}], " ", "-", " ", 
     RowBox[{"stage", " ", "2"}]}], ":", " ", 
    RowBox[{
     RowBox[{
     "Population", " ", "sort", " ", "anticipating", " ", "majority", " ", 
      "tax", " ", "rates", " ", "set", " ", "at", " ", "stage", " ", "3", " ",
       "and", " ", "taking", " ", "first"}], "-", 
     RowBox[{"stage", " ", "tax", " ", "rates", " ", "as", " ", "given"}]}]}],
    " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{"--", 
     RowBox[{"-", " ", "End"}]}], " ", "of", " ", "period", " ", "1", " ", 
    RowBox[{"(", "consumption", ")"}]}], " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"-", " ", "Period"}], " ", "2"}], " ", "-", " ", 
     RowBox[{"stage", " ", "3"}]}], ":", " ", 
    RowBox[{
    "Majority", " ", "tax", " ", "rate", " ", "set", " ", "in", " ", "each", 
     " ", "jurisdiction", " ", 
     RowBox[{"(", 
      RowBox[{"for", " ", "a", " ", "given", " ", "population"}], ")"}]}]}], 
   " ", "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", " ", 
   RowBox[{
    RowBox[{
     RowBox[{"--", 
      RowBox[{"-", " ", "End"}]}], " ", "of", " ", "period", " ", "2", " ", 
     RowBox[{"(", "consumption", ")"}]}], " ", "-", " ", 
    RowBox[{"End", " ", "of", " ", "the", " ", "game"}]}], " ", "*)"}], 
  "\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
    "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
     "**", "**", "**"}], "*", 
    RowBox[{
    "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
     "**", "**"}], "*", "*", 
    RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], "*",
     "*", "**"}], "*)"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{"NB", ":", " ", 
    RowBox[{
    "This", " ", "code", " ", "defines", " ", "the", " ", "main", " ", 
     "equations", " ", "of", " ", "the", " ", 
     RowBox[{"paper", ".", " ", "The"}], " ", "equilibrium", " ", "presented",
      " ", "in", " ", "the", " ", "Appendix", " ", "has", " ", "been", " ", 
     "found", " ", "by", " ", "\"\<trial and error\>\"", " ", "starting", " ",
      "from", " ", "optimal", " ", "tax", " ", "rates", " ", "jurisdiction", 
     " ", "would", " ", "set", " ", "without", " ", "mobility", "  ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
       "calculating", " ", "tax", " ", "reaction", " ", "functions", " ", 
        "at", " ", "three"}], "-", 
       RowBox[{
       "digit", " ", "precision", " ", "would", " ", "be", " ", "extremely", 
        " ", "time"}], "-", "consuming"}], ")"}]}]}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
    "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
     "**", "**", "**"}], "*", 
    RowBox[{
    "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
     "**", "**"}], "*", "*", 
    RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], "*",
     "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"Clear", "[", "\"\<`*\>\"", "]"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]", 
   StyleBox[
    RowBox[{"(*", 
     RowBox[{
      RowBox[{
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
        "**", "**", "**", "**"}], "*", 
      RowBox[{
      "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", 
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
        "**", "**", "**"}], "*", "*", 
      RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}]}], 
     "*****)"}],
    FontWeight->"Plain"], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{"Baseline", " ", "parameters"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"cprefA", "=", "1"}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"culture", "-", 
     RowBox[{"related", " ", "preference", " ", "of", " ", "low"}], "-", 
     RowBox[{"preference", " ", "jurisdiction", " ", "A"}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"cprefB", "=", "4"}], ";"}], "  ", 
   RowBox[{"(*", 
    RowBox[{"culture", "-", 
     RowBox[{"related", " ", "preference", " ", "of", " ", "high"}], "-", 
     RowBox[{"preference", " ", "jurisdiction", " ", "B"}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"m", "=", "0"}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"mobility", " ", "costs", " ", "of", " ", "mobile", " ", 
     RowBox[{"individuals", ":", " ", 
      RowBox[{
      "identical", " ", "to", " ", "all", " ", "mobile", " ", "individuals", 
       " ", "and", " ", "set", " ", "to", " ", "0"}]}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"sm", "=", " ", "0.5"}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"share", " ", "of", " ", "mobile", " ", "individual"}], " ", "-",
      " ", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "sm"}], ")"}], " ", "is", " ", "the", " ", "share", 
      " ", "of", " ", "immobile"}]}], "*)"}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{"Income", " ", "distribution"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"lw", " ", "=", "1"}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
      RowBox[{
      "lowest", " ", "income", " ", "w", " ", "such", " ", "that", " ", 
       "highest", " ", "most"}], "-", 
      RowBox[{"prefered", " ", "tax", " ", "rate"}]}], " ", "=", " ", "1"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"uw", "=", " ", "25"}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"highest", " ", "income"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"inc", " ", "=", " ", 
     RowBox[{"TriangularDistribution", "[", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{"lw", ",", "uw"}], "}"}], ",", "lw"}], "]"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Triangular", " ", "distribution", " ", "with", " ", "mode"}], 
     " ", "=", " ", "lw"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"lhA", " ", "=", " ", 
     RowBox[{"lw", "/", "cprefA"}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"lowest", " ", "hedonic", " ", "income", " ", "in", " ", "A"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"lhB", " ", "=", " ", 
     RowBox[{"lw", "/", "cprefB"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{"lowest", " ", "hedonic", " ", "income", " ", "in", " ", "B"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"uhA", " ", "=", " ", 
     RowBox[{"uw", "/", "cprefA"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{"highest", " ", "hedonic", " ", "income", " ", "in", " ", "A"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"uhB", " ", "=", " ", 
     RowBox[{"uw", "/", "cprefB"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{"highest", " ", "hedonic", " ", "income", " ", "in", " ", "B"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"lh", " ", "=", " ", 
     RowBox[{"Min", "[", 
      RowBox[{
       RowBox[{"lw", "/", "cprefA"}], ",", 
       RowBox[{"lw", "/", "cprefB"}]}], "]"}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
    "lowest", " ", "hedonic", " ", "income", " ", "in", " ", "economy"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"uh", " ", "=", " ", 
     RowBox[{"Max", "[", 
      RowBox[{
       RowBox[{"uw", "/", "cprefA"}], ",", " ", 
       RowBox[{"uw", "/", "cprefB"}]}], "]"}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
    "highest", " ", "hedonic", " ", "income", " ", "in", " ", "economy"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"HA", "=", 
     RowBox[{"TransformedDistribution", "[", 
      RowBox[{
       RowBox[{"x", "/", "cprefA"}], " ", ",", 
       RowBox[{"x", "\[Distributed]", "inc"}]}], "]"}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
    "Transformed", " ", "income", " ", "distribution", " ", "in", " ", "A"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"HB", "=", 
     RowBox[{"TransformedDistribution", "[", 
      RowBox[{
       RowBox[{"x", "/", "cprefB"}], ",", 
       RowBox[{"x", "\[Distributed]", "inc"}]}], "]"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{
    "Transformed", " ", "income", " ", "distribution", " ", "in", " ", "B"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{"Plot", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"PDF", "[", 
        RowBox[{"HA", ",", "x"}], "]"}], ",", 
       RowBox[{"PDF", "[", 
        RowBox[{"HB", ",", "x"}], "]"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"x", ",", "0", ",", "uw"}], "}"}], ",", 
     RowBox[{"Filling", "\[Rule]", "Axis"}], ",", " ", 
     RowBox[{"PlotRange", "\[Rule]", "All"}], ",", 
     RowBox[{"PlotLegends", "\[Rule]", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Hedonic income in A\>\"", ",", "\"\<Hedonic income in B\>\""}], 
       "}"}]}]}], "]"}], "\[IndentingNewLine]", 
   RowBox[{"TableForm", "[", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"\"\<Stage 0: Mean income in A and B:\>\"", ",", 
        RowBox[{"N", "[", 
         RowBox[{"Mean", "[", "inc", "]"}], "]"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"\"\<Stage 0: Median hedonic income in A:\>\"", ",", 
        RowBox[{"N", "[", 
         RowBox[{"Median", "[", "HA", "]"}], "]"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{"\"\<Stage 0: Median hedonic income in B:\>\"", ",", 
        RowBox[{"N", "[", 
         RowBox[{"Median", "[", "HB", "]"}], "]"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Stage 0: Majority tax rates in A (without migration):\>\"", ",", 
        RowBox[{"N", "[", 
         RowBox[{"1", "/", 
          RowBox[{"Median", "[", "HA", "]"}]}], "]"}]}], "}"}], ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<Stage 0: Majority tax rates in B (without migration):\>\"", ",", 
        RowBox[{"N", "[", 
         RowBox[{"1", "/", 
          RowBox[{"Median", "[", "HB", "]"}]}], "]"}]}], "}"}]}], "}"}], 
    "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Mean", " ", "income"}], ",", " ", 
     RowBox[{"median", " ", "hedonic", " ", "income"}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"MeanH", "[", 
     RowBox[{"lowA_", ",", "lowB_", ",", "upA_", ",", "upB_"}], "]"}], ":=", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "sm"}], ")"}], "*", 
        RowBox[{"Mean", "[", "inc", "]"}]}], "+", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"Expectation", "[", 
          RowBox[{
           RowBox[{"x", "\[Conditioned]", 
            RowBox[{"(", 
             RowBox[{"lowA", "<", "x", "<", "upA"}], ")"}]}], ",", 
           RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}], "*", "sm", "*", 
         "cprefA", "*", 
         RowBox[{"Probability", "[", 
          RowBox[{
           RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
           RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ")"}], " ", "+", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"Expectation", "[", 
          RowBox[{
           RowBox[{"x", "\[Conditioned]", 
            RowBox[{"(", 
             RowBox[{"lowB", "<", "x", "<", "upB"}], ")"}]}], ",", 
           RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}], "*", "sm", "*", 
         "cprefB", "*", 
         RowBox[{"Probability", "[", 
          RowBox[{
           RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
           RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ")"}]}], ")"}], 
     "/", 
     RowBox[{"(", 
      RowBox[{"1", "-", "sm", "+", 
       RowBox[{"(", 
        RowBox[{"sm", "*", 
         RowBox[{"Probability", "[", 
          RowBox[{
           RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
           RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ")"}], "+", 
       RowBox[{"(", 
        RowBox[{"sm", "*", 
         RowBox[{"Probability", "[", 
          RowBox[{
           RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
           RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ")"}]}], 
      ")"}]}]}], " ", 
   RowBox[{"(*", 
    RowBox[{
    "Mean", " ", "income", " ", "within", " ", "hedonic", " ", "income", " ", 
     "class"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"MedHA", "[", 
      RowBox[{
       RowBox[{"lowA_", "?", "NumericQ"}], ",", 
       RowBox[{"lowB_", "?", "NumericQ"}], ",", 
       RowBox[{"upA_", "?", "NumericQ"}], ",", 
       RowBox[{"upB_", "?", "NumericQ"}]}], "]"}], ":=", 
     RowBox[{"d", "/.", 
      RowBox[{
       RowBox[{"FindRoot", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "-", "sm"}], ")"}], "*", 
            RowBox[{"Probability", "[", 
             RowBox[{
              RowBox[{"lhA", "<", "x", "<", "d"}], ",", 
              RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"Min", "[", 
               RowBox[{
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowA", "<", "x", "<", "d"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ",", 
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}]}], "]"}], 
              "+", 
              RowBox[{"Min", "[", 
               RowBox[{
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowB", "<", "x", "<", "d"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ",", 
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}]}], 
               "]"}]}], ")"}], "/", 
            RowBox[{"(", 
             RowBox[{"1", "-", "sm", "+", 
              RowBox[{"(", 
               RowBox[{"sm", "*", 
                RowBox[{"Probability", "[", 
                 RowBox[{
                  RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
                  RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ")"}], 
              "+", 
              RowBox[{"(", 
               RowBox[{"sm", "*", 
                RowBox[{"Probability", "[", 
                 RowBox[{
                  RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
                  RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ")"}]}], 
             ")"}]}]}], "\[Equal]", "0.5"}], ",", 
         RowBox[{"{", 
          RowBox[{"d", ",", 
           RowBox[{"Min", "[", 
            RowBox[{"lowA", ",", "lowB"}], "]"}]}], "}"}]}], "]"}], " ", "[", 
       RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{"Median", " ", "hedonic", " ", "income", " ", "in", " ", "A"}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"MedHB", "[", 
      RowBox[{
       RowBox[{"lowA_", "?", "NumericQ"}], ",", 
       RowBox[{"lowB_", "?", "NumericQ"}], ",", 
       RowBox[{"upA_", "?", "NumericQ"}], ",", 
       RowBox[{"upB_", "?", "NumericQ"}]}], "]"}], ":=", 
     RowBox[{"d", "/.", 
      RowBox[{
       RowBox[{"FindRoot", "[", 
        RowBox[{
         RowBox[{
          RowBox[{
           RowBox[{
            RowBox[{"(", 
             RowBox[{"1", "-", "sm"}], ")"}], "*", 
            RowBox[{"Probability", "[", 
             RowBox[{
              RowBox[{"lhB", "<", "x", "<", "d"}], ",", 
              RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              RowBox[{"Min", "[", 
               RowBox[{
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowA", "<", "x", "<", "d"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ",", 
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}]}], "]"}], 
              "+", 
              RowBox[{"Min", "[", 
               RowBox[{
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowB", "<", "x", "<", "d"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ",", 
                RowBox[{"sm", "*", 
                 RowBox[{"Probability", "[", 
                  RowBox[{
                   RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
                   RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}]}], 
               "]"}]}], ")"}], "/", 
            RowBox[{"(", 
             RowBox[{"1", "-", "sm", "+", 
              RowBox[{"(", 
               RowBox[{"sm", "*", 
                RowBox[{"Probability", "[", 
                 RowBox[{
                  RowBox[{"lowA", "<", "x", "<", "upA"}], ",", 
                  RowBox[{"x", "\[Distributed]", "HA"}]}], "]"}]}], ")"}], 
              "+", 
              RowBox[{"(", 
               RowBox[{"sm", "*", 
                RowBox[{"Probability", "[", 
                 RowBox[{
                  RowBox[{"lowB", "<", "x", "<", "upB"}], ",", 
                  RowBox[{"x", "\[Distributed]", "HB"}]}], "]"}]}], ")"}]}], 
             ")"}]}]}], "\[Equal]", "0.5"}], ",", 
         RowBox[{"{", 
          RowBox[{"d", ",", 
           RowBox[{"Min", "[", 
            RowBox[{"lowA", ",", "lowB"}], "]"}]}], "}"}]}], "]"}], " ", "[", 
       RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"Median", " ", "hedonic", " ", "income", " ", "in", " ", "B"}], 
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{"Location", " ", "decisions"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"GA", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", " ", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"TA", "\[LessEqual]", "  ", "TB"}], ",", 
       RowBox[{"MeanH", "[", 
        RowBox[{"ya", ",", "yb", ",", "uhA", ",", "uhB"}], "]"}], ",", 
       RowBox[{"MeanH", "[", 
        RowBox[{"lhA", ",", "lhB", ",", "ya", ",", "yb"}], "]"}]}], "]"}]}], 
    ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"Tax", " ", "base", " ", "in", " ", "A"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"GB", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", " ", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"TA", "\[LessEqual]", "  ", "TB"}], ",", 
       RowBox[{"MeanH", "[", 
        RowBox[{"lhA", ",", "lhB", ",", "ya", ",", "yb"}], "]"}], ",", 
       RowBox[{"MeanH", "[", 
        RowBox[{"ya", ",", "yb", ",", "uhA", ",", "uhB"}], "]"}]}], "]"}]}], 
    ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"Tax", " ", "base", " ", "in", " ", "B"}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"MA", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", " ", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"TA", "\[LessEqual]", "  ", "TB"}], ",", 
       RowBox[{"MedHA", "[", 
        RowBox[{"ya", ",", "yb", ",", "uhA", ",", "uhB"}], "]"}], ",", 
       RowBox[{"MedHA", "[", 
        RowBox[{"lhA", ",", "lhB", ",", "ya", ",", "yb"}], "]"}]}], "]"}]}], 
    ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"Second", "-", 
     RowBox[{"period", " ", "tax", " ", "rate", " ", "in", " ", "A"}]}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"MB", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", " ", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"TA", "\[LessEqual]", "  ", "TB"}], ",", 
       RowBox[{"MedHB", "[", 
        RowBox[{"lhA", ",", "lhB", ",", "ya", ",", "yb"}], "]"}], ",", 
       RowBox[{"MedHB", "[", 
        RowBox[{"ya", ",", "yb", ",", "uhA", ",", "uhB"}], "]"}]}], "]"}]}], 
    ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{"Second", "-", 
     RowBox[{"period", " ", "tax", " ", "rate", " ", "in", " ", "B"}]}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"VA", "[", 
      RowBox[{"w_", ",", "TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "TA"}], ")"}], "w"}], " ", "+", 
      RowBox[{"Log", "[", 
       RowBox[{"TA", "*", 
        RowBox[{"GA", "[", 
         RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], "]"}], "+", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "-", 
           RowBox[{"Min", "[", 
            RowBox[{
             RowBox[{"1", "/", 
              RowBox[{"MA", "[", 
               RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], ",", 
             "1"}], "]"}]}], ")"}], "w"}], "+", 
        RowBox[{"Log", "[", 
         RowBox[{
          RowBox[{"GA", "[", 
           RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "*", 
          RowBox[{"Min", "[", 
           RowBox[{
            RowBox[{"1", "/", 
             RowBox[{"MA", "[", 
              RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], ",", 
            "1"}], "]"}]}], "]"}]}], ")"}]}]}], ";"}], " ", 
   RowBox[{"(*", 
    RowBox[{
    "Indirect", " ", "utility", " ", "function", " ", "of", " ", "individual",
      " ", "with", " ", "hedonic", " ", "income", " ", "w", " ", "when", " ", 
     "living", " ", "in", " ", "A"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"VB", "[", 
      RowBox[{"w_", ",", "TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=",
      " ", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "TB"}], ")"}], "w"}], " ", "+", 
      RowBox[{"Log", "[", 
       RowBox[{"TB", "*", 
        RowBox[{"GB", "[", 
         RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], "]"}], "+", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "-", 
           RowBox[{"Min", "[", 
            RowBox[{
             RowBox[{"1", "/", 
              RowBox[{"MB", "[", 
               RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], ",", 
             "1"}], "]"}]}], ")"}], "w"}], " ", "+", 
        RowBox[{"Log", "[", 
         RowBox[{
          RowBox[{"GB", "[", 
           RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "*", 
          RowBox[{"Min", "[", 
           RowBox[{
            RowBox[{"1", "/", 
             RowBox[{"MB", "[", 
              RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}]}], ",", 
            "1"}], "]"}]}], "]"}]}], ")"}]}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{
    "Indirect", " ", "utility", " ", "function", " ", "of", " ", "individual",
      " ", "with", " ", "hedonic", " ", "income", " ", "w", " ", "when", " ", 
     "living", " ", "in", " ", "B"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"DVA", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", 
     RowBox[{
      RowBox[{"VB", "[", 
       RowBox[{"ya", ",", "TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "-", 
      RowBox[{"VA", "[", 
       RowBox[{"ya", ",", "TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "-",
       "m"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "Utility", " ", "differential", " ", "for", " ", "individual", " ", 
      "born", " ", "in", " ", "A"}], ";", " ", 
     RowBox[{
      RowBox[{"Move", " ", "to", " ", "B", " ", "if"}], " ", ">", "0"}]}], 
    "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"DVB", "[", 
      RowBox[{"TA_", ",", "TB_", ",", "ya_", ",", "yb_"}], "]"}], ":=", 
     RowBox[{
      RowBox[{"VA", "[", 
       RowBox[{"yb", ",", "TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "-", 
      RowBox[{"VB", "[", 
       RowBox[{"yb", ",", "TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], "-",
       "m"}]}], ";"}], 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "Utility", " ", "differential", " ", "for", " ", "individual", " ", 
      "born", " ", "in", " ", "B"}], ";", " ", 
     RowBox[{
      RowBox[{"Move", " ", "to", " ", "A", " ", "if"}], " ", ">", "0"}]}], 
    "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Spatial", " ", "equilibrium", " ", 
      RowBox[{"condition", ":", " ", 
       RowBox[{
       "Find", " ", "indifferent", " ", "individuals", " ", "who", " ", 
        "anticipate", " ", "the", " ", "majority", " ", "tax", " ", "rate", 
        " ", "set", " ", "in", " ", "last", " ", "period", " ", "in", " ", 
        "each", " ", "jurisdiction"}]}]}], ",", " ", 
     RowBox[{
      RowBox[{"taking", " ", "as", " ", "given", " ", "the", " ", "first"}], 
      "-", 
      RowBox[{"period", " ", "tax", " ", "rates"}]}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"spe", "[", 
     RowBox[{"TA_", ",", "TB_"}], "]"}], ":=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"Min", "[", 
       RowBox[{
        RowBox[{"Max", "[", 
         RowBox[{
          RowBox[{"ya", "/.", 
           RowBox[{"FindRoot", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{
               RowBox[{
                RowBox[{"DVA", "[", 
                 RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], 
                "\[Equal]", "0"}], ",", 
               RowBox[{
                RowBox[{"DVB", "[", 
                 RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], 
                "\[Equal]", "0"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"ya", ",", 
                 RowBox[{"Median", "[", "HA", "]"}]}], "}"}], ",", 
               RowBox[{"{", 
                RowBox[{"yb", ",", 
                 RowBox[{"Median", "[", "HB", "]"}]}], "}"}]}], "}"}]}], 
            "]"}]}], ",", "lhA"}], "]"}], ",", "uhA"}], "]"}], ",", 
      RowBox[{"Min", "[", 
       RowBox[{
        RowBox[{"Max", "[", 
         RowBox[{
          RowBox[{"yb", "/.", 
           RowBox[{"FindRoot", "[", 
            RowBox[{
             RowBox[{"{", 
              RowBox[{
               RowBox[{
                RowBox[{"DVA", "[", 
                 RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], 
                "\[Equal]", "0"}], ",", 
               RowBox[{
                RowBox[{"DVB", "[", 
                 RowBox[{"TA", ",", "TB", ",", "ya", ",", "yb"}], "]"}], 
                "\[Equal]", "0"}]}], "}"}], ",", 
             RowBox[{"{", 
              RowBox[{
               RowBox[{"{", 
                RowBox[{"ya", ",", 
                 RowBox[{"Median", "[", "HA", "]"}]}], "}"}], ",", 
               RowBox[{"{", 
                RowBox[{"yb", ",", 
                 RowBox[{"Median", "[", "HB", "]"}]}], "}"}]}], "}"}]}], 
            "]"}]}], ",", "lhB"}], "]"}], ",", "uhB"}], "]"}]}], "}"}]}], 
   "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{"Tax", " ", "reaction", " ", 
      RowBox[{"functions", ":", " ", 
       RowBox[{
        RowBox[{"Find", " ", "the", " ", "utility"}], "-", 
        RowBox[{
        "maximizing", " ", "tax", " ", "rate", " ", "for", " ", "individual", 
         " ", "with", " ", "median", " ", "hedonic", " ", "income", " ", "in",
          " ", "each", " ", "jurisdiction"}]}]}]}], ",", " ", 
     RowBox[{
     "anticipating", " ", "how", " ", "tax", " ", "rates", " ", "change", " ",
       "the", " ", "spatial", " ", "equilibrium", " ", "and", " ", "taking", 
      " ", "as", " ", "given", " ", "the", " ", "tax", " ", "rate", " ", "in",
       " ", "the", " ", "other", " ", "jurisdiction"}]}], "*)"}], 
   "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**"}], "*", 
     RowBox[{
     "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**", "**",
       "**", "**"}], "*", "*", 
     RowBox[{"**", "**", "**", "**", "**", "**", "**", "**", "**", "**"}], 
     "*", "*", "**"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"incrt", " ", "=", " ", "0.001"}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"minincrt", "=", "incrt"}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"maxincrt", "=", "0.55"}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"precision", " ", "=", " ", "incrt"}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"gridt", "=", 
     RowBox[{"Round", "[", 
      RowBox[{
       RowBox[{"Table", "[", 
        RowBox[{"h", ",", 
         RowBox[{"{", 
          RowBox[{"h", ",", "minincrt", ",", "maxincrt", ",", "incrt"}], 
          "}"}]}], "]"}], ",", " ", "precision"}], "]"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"RTA", "[", "TB_", "]"}], ":=", 
     RowBox[{
      RowBox[{
       RowBox[{"Ordering", "[", 
        RowBox[{
         RowBox[{"Table", "[", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"spe", "[", 
                  RowBox[{
                   RowBox[{"gridt", "[", 
                    RowBox[{"[", "h", "]"}], "]"}], ",", "TB"}], "]"}], 
                 "\[Equal]", 
                 RowBox[{"{", 
                  RowBox[{"uhA", ",", "uhB"}], "}"}]}], "&&", " ", 
                RowBox[{
                 RowBox[{"gridt", "[", 
                  RowBox[{"[", "h", "]"}], "]"}], "<", "TB"}]}], ")"}], "||", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"spe", "[", 
                  RowBox[{
                   RowBox[{"gridt", "[", 
                    RowBox[{"[", "h", "]"}], "]"}], ",", "TB"}], "]"}], 
                 "\[Equal]", 
                 RowBox[{"{", 
                  RowBox[{"lhA", ",", "lhB"}], "}"}]}], "&&", " ", 
                RowBox[{
                 RowBox[{"gridt", "[", 
                  RowBox[{"[", "h", "]"}], "]"}], ">", "TB"}]}], ")"}]}], ",",
              "0", ",", 
             RowBox[{"VA", "[", 
              RowBox[{
               RowBox[{"Median", "[", "HA", "]"}], ",", 
               RowBox[{"gridt", "[", 
                RowBox[{"[", "h", "]"}], "]"}], ",", "TB", ",", 
               RowBox[{
                RowBox[{"spe", "[", 
                 RowBox[{
                  RowBox[{"gridt", "[", 
                   RowBox[{"[", "h", "]"}], "]"}], ",", "TB"}], "]"}], "[", 
                RowBox[{"[", "1", "]"}], "]"}], ",", 
               RowBox[{
                RowBox[{"spe", "[", 
                 RowBox[{
                  RowBox[{"gridt", "[", 
                   RowBox[{"[", "h", "]"}], "]"}], ",", "TB"}], "]"}], "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"h", ",", "1", ",", 
             RowBox[{
              RowBox[{
               RowBox[{"(", 
                RowBox[{"1", "/", "incrt"}], ")"}], "*", 
               RowBox[{"(", 
                RowBox[{"maxincrt", "-", "minincrt"}], ")"}]}], "+", "1"}], 
             ",", "1"}], "}"}]}], "]"}], ",", 
         RowBox[{"-", "1"}]}], "]"}], "[", 
       RowBox[{"[", "1", "]"}], "]"}], "*", "incrt"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"RTB", "[", "TA_", "]"}], ":=", 
     RowBox[{
      RowBox[{
       RowBox[{"Ordering", "[", 
        RowBox[{
         RowBox[{"Table", "[", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"If", "[", 
            RowBox[{
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"spe", "[", 
                  RowBox[{"TA", ",", 
                   RowBox[{"gridt", "[", 
                    RowBox[{"[", "h", "]"}], "]"}]}], "]"}], "\[Equal]", 
                 RowBox[{"{", 
                  RowBox[{"uhA", ",", "uhA"}], "}"}]}], "&&", " ", 
                RowBox[{
                 RowBox[{"gridt", "[", 
                  RowBox[{"[", "h", "]"}], "]"}], "<", "TA"}]}], ")"}], "||", 
              RowBox[{"(", 
               RowBox[{
                RowBox[{
                 RowBox[{"spe", "[", 
                  RowBox[{"TA", ",", 
                   RowBox[{"gridt", "[", 
                    RowBox[{"[", "h", "]"}], "]"}]}], "]"}], "\[Equal]", 
                 RowBox[{"{", 
                  RowBox[{"lhA", ",", "lhB"}], "}"}]}], "&&", " ", 
                RowBox[{
                 RowBox[{"gridt", "[", 
                  RowBox[{"[", "h", "]"}], "]"}], ">", "TA"}]}], ")"}]}], ",",
              "0", ",", "\[IndentingNewLine]", 
             RowBox[{"VB", "[", 
              RowBox[{
               RowBox[{"Median", "[", "HB", "]"}], ",", "TA", ",", 
               RowBox[{"gridt", "[", 
                RowBox[{"[", "h", "]"}], "]"}], ",", 
               RowBox[{
                RowBox[{"spe", "[", 
                 RowBox[{"TA", ",", 
                  RowBox[{"gridt", "[", 
                   RowBox[{"[", "h", "]"}], "]"}]}], "]"}], "[", 
                RowBox[{"[", "1", "]"}], "]"}], ",", 
               RowBox[{
                RowBox[{"spe", "[", 
                 RowBox[{"TA", ",", 
                  RowBox[{"gridt", "[", 
                   RowBox[{"[", "h", "]"}], "]"}]}], "]"}], "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], "]"}]}], "]"}], ",", 
           RowBox[{"{", 
            RowBox[{"h", ",", "1", ",", 
             RowBox[{
              RowBox[{
               RowBox[{"(", 
                RowBox[{"1", "/", "incrt"}], ")"}], "*", 
               RowBox[{"(", 
                RowBox[{"maxincrt", "-", "minincrt"}], ")"}]}], "+", "1"}], 
             ",", "1"}], "}"}]}], "]"}], ",", 
         RowBox[{"-", "1"}]}], "]"}], "[", 
       RowBox[{"[", "1", "]"}], "]"}], "*", "incrt"}]}], ";"}], 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.643019265731583*^9, 3.643019369603483*^9}, {
   3.643019448730894*^9, 3.643019449506748*^9}, 3.643019595785469*^9, {
   3.6430210850724277`*^9, 3.6430210865196333`*^9}, {3.643022590833794*^9, 
   3.6430226116577597`*^9}, {3.6430763277162027`*^9, 3.643076331672167*^9}, {
   3.643078893393136*^9, 3.643078914165246*^9}, {3.6430789497460613`*^9, 
   3.643078983102098*^9}, {3.643079058843833*^9, 3.643079060051463*^9}, {
   3.643079158006651*^9, 3.643079184834509*^9}, {3.643079359915181*^9, 
   3.643079400198*^9}, {3.643079503235117*^9, 3.643079508864747*^9}, {
   3.6430795418409986`*^9, 3.6430795436708813`*^9}, {3.643079617678784*^9, 
   3.6430796201482277`*^9}, {3.6430796701022387`*^9, 3.643079670404868*^9}, {
   3.64308499534167*^9, 3.6430850209242563`*^9}, 3.643103658292182*^9, {
   3.6431038399233923`*^9, 3.64310388663848*^9}, {3.643104768047606*^9, 
   3.643104770059819*^9}, {3.6431049328883266`*^9, 3.643104934356195*^9}, {
   3.64310508527973*^9, 3.6431050872755938`*^9}, {3.662098223795864*^9, 
   3.6620982826756372`*^9}, 3.662098701333432*^9, {3.6620987350800467`*^9, 
   3.662098737849552*^9}, {3.662098870339891*^9, 3.662098905701922*^9}, {
   3.662099435293478*^9, 3.662099444155504*^9}, {3.662099714996572*^9, 
   3.662099717627144*^9}, {3.662099794820509*^9, 3.662099795809576*^9}, {
   3.662099832660877*^9, 3.662099836042473*^9}, {3.662100245906041*^9, 
   3.662100246337434*^9}, {3.662100286155718*^9, 3.66210040004602*^9}, {
   3.662102895802493*^9, 3.6621029142901793`*^9}, 3.662103025231579*^9, {
   3.6621107802709837`*^9, 3.662110820661178*^9}, {3.662110916124434*^9, 
   3.662110921735547*^9}, {3.662116510900956*^9, 3.662116527105901*^9}, {
   3.662174392843329*^9, 3.662174393185192*^9}, {3.6621797778060217`*^9, 
   3.6621797891484413`*^9}, {3.662179866165254*^9, 3.662179884184998*^9}, {
   3.662180377444254*^9, 3.662180387419113*^9}, {3.662185197785966*^9, 
   3.6621852102089367`*^9}, {3.662185255282393*^9, 3.66218528578032*^9}, {
   3.662185339297213*^9, 3.662185343283193*^9}, {3.662185423088375*^9, 
   3.662185486003455*^9}, {3.6621857531325283`*^9, 3.662185778430151*^9}, {
   3.662186984682963*^9, 3.662187042187251*^9}, {3.6621871026974983`*^9, 
   3.662187144144565*^9}, {3.662187268878541*^9, 3.6621873112517548`*^9}, 
   3.662187537536957*^9, {3.662187576083799*^9, 3.6621876031777563`*^9}, {
   3.662187962982036*^9, 3.662187989267702*^9}, {3.6621880442901773`*^9, 
   3.6621880587473*^9}, {3.662188138670785*^9, 3.662188144963698*^9}, {
   3.662188216979651*^9, 3.662188224171129*^9}, {3.662188259945572*^9, 
   3.662188318062879*^9}, {3.662188368136386*^9, 3.662188393527223*^9}, {
   3.662281562204397*^9, 3.6622815629202957`*^9}, {3.662283998537652*^9, 
   3.66228400056533*^9}, {3.6622840504572287`*^9, 3.662284051790781*^9}, {
   3.662286327324275*^9, 3.662286328358304*^9}, {3.662291320981942*^9, 
   3.662291371111979*^9}, {3.662291416917964*^9, 3.662291419923607*^9}, {
   3.66229152263568*^9, 3.6622915723032303`*^9}, 3.662291619597671*^9, {
   3.6623460996646023`*^9, 3.662346114387636*^9}, {3.6623461789423122`*^9, 
   3.662346179262539*^9}, {3.662346453964964*^9, 3.6623464590290956`*^9}, {
   3.662346763701613*^9, 3.6623467694125443`*^9}, {3.662346902530298*^9, 
   3.6623469068363647`*^9}, {3.662346978959401*^9, 3.662346981390082*^9}, {
   3.6623470229929523`*^9, 3.6623470920827923`*^9}, {3.66234718854591*^9, 
   3.662347190240746*^9}, {3.662347220494171*^9, 3.662347247304224*^9}, {
   3.662347327333721*^9, 3.6623473505200377`*^9}, {3.662347402137273*^9, 
   3.6623474028272543`*^9}, {3.662347478176896*^9, 3.662347478513402*^9}, {
   3.662347659275814*^9, 3.662347663735499*^9}, {3.6623476956494427`*^9, 
   3.662347714056438*^9}, {3.662348151747067*^9, 3.6623481887197943`*^9}, {
   3.662348235489684*^9, 3.66234824880156*^9}, {3.6623484398912888`*^9, 
   3.6623484505616093`*^9}, {3.662348956737258*^9, 3.662348976048381*^9}, {
   3.662349062779352*^9, 3.6623490692189293`*^9}, {3.662349451256483*^9, 
   3.6623494547438583`*^9}, {3.662349534210428*^9, 3.662349542014967*^9}, {
   3.662349637645007*^9, 3.6623496470431547`*^9}, {3.662349986652835*^9, 
   3.662350027652565*^9}, {3.662350072571271*^9, 3.662350075914196*^9}, {
   3.6623670154853363`*^9, 3.662367015852809*^9}, {3.6623672019277763`*^9, 
   3.662367204381351*^9}, {3.662378013076273*^9, 3.6623780395020943`*^9}, {
   3.662378280590598*^9, 3.6623782882288218`*^9}, {3.662378327241332*^9, 
   3.662378460983801*^9}, {3.662378495282305*^9, 3.66237849648059*^9}, {
   3.662791031175559*^9, 3.6627910458676167`*^9}, {3.662791237487393*^9, 
   3.6627913306773157`*^9}, {3.662791636950655*^9, 3.6627916415244904`*^9}, {
   3.662791675850358*^9, 3.662791848325527*^9}, {3.662791883092085*^9, 
   3.662791940751727*^9}, {3.6627920139344883`*^9, 3.662792035638382*^9}, {
   3.662792082453474*^9, 3.662792109928986*^9}, {3.662792194219062*^9, 
   3.6627922275874987`*^9}, {3.662792399030754*^9, 3.662792403170932*^9}, {
   3.662792472629137*^9, 3.662792486137698*^9}, {3.6627925214839563`*^9, 
   3.6627925236218567`*^9}, {3.6627925545997057`*^9, 3.662792608158595*^9}, {
   3.662792650262968*^9, 3.6627926718925943`*^9}, {3.66279273491847*^9, 
   3.662792741983684*^9}, {3.662792793767961*^9, 3.662792828140202*^9}, {
   3.662792863424994*^9, 3.6627928764188557`*^9}, {3.662804221812365*^9, 
   3.662804252469453*^9}, {3.6628661346939497`*^9, 3.6628661373290043`*^9}, {
   3.663066371215053*^9, 3.6630664448081627`*^9}, {3.6630664894738073`*^9, 
   3.663066601654009*^9}, {3.663066639242826*^9, 3.663066652857967*^9}, {
   3.66306670317304*^9, 3.663066791499085*^9}, {3.663066886622188*^9, 
   3.663066925772156*^9}, {3.6630670256155777`*^9, 3.663067121769861*^9}, {
   3.6630672022971888`*^9, 3.663067225009097*^9}, {3.663069263849431*^9, 
   3.66306935595862*^9}, {3.6630696463147287`*^9, 3.663069647481213*^9}, {
   3.6630696798786793`*^9, 3.663069683557145*^9}, {3.663306421122267*^9, 
   3.663306424726885*^9}, {3.663306770734593*^9, 3.663306778802741*^9}, {
   3.663307461858494*^9, 3.6633075122567368`*^9}, {3.6633087372020884`*^9, 
   3.66330874339219*^9}, {3.663308783744605*^9, 3.663308800405623*^9}, {
   3.663308866552341*^9, 3.663308868679428*^9}, {3.663308903623855*^9, 
   3.663308924343403*^9}, {3.663308976037034*^9, 3.663309015513009*^9}, {
   3.6633090466866083`*^9, 3.6633091040784893`*^9}, {3.663309258707052*^9, 
   3.6633094052987757`*^9}, {3.663311006405053*^9, 3.663311009841164*^9}, {
   3.663311066288752*^9, 3.663311095166284*^9}, {3.66331163946563*^9, 
   3.663311657136829*^9}, {3.663311770549057*^9, 3.66331181420539*^9}, {
   3.671240589274497*^9, 3.671240603755166*^9}, {3.671241053006598*^9, 
   3.671241100188917*^9}, {3.671241453566346*^9, 3.671241455240102*^9}, {
   3.67124606339944*^9, 3.671246063824026*^9}, {3.671246143394896*^9, 
   3.671246236031427*^9}, {3.671246267653268*^9, 3.6712462829712267`*^9}, 
   3.671246350294941*^9, 3.671246688759718*^9, {3.6712467215228024`*^9, 
   3.671246816082122*^9}, {3.671246848748646*^9, 3.6712469954219933`*^9}, {
   3.6712472321572237`*^9, 3.671247242899324*^9}, {3.671247318012701*^9, 
   3.6712473263072767`*^9}, 3.671247505411162*^9, {3.671247583942024*^9, 
   3.6712476623117523`*^9}, 3.67124784073241*^9, {3.671250597224395*^9, 
   3.671250684894499*^9}, {3.6712507253278723`*^9, 3.671250770320266*^9}, {
   3.6712508327076902`*^9, 3.6712508436825247`*^9}, {3.671251380217255*^9, 
   3.6712514683951397`*^9}, {3.671251545326805*^9, 3.671251554691893*^9}, 
   3.671352318417119*^9, 3.673319149222508*^9, {3.6733195545886097`*^9, 
   3.6733198298393993`*^9}, {3.67331989258832*^9, 3.67331989289756*^9}, {
   3.6733200170111723`*^9, 3.673320020728196*^9}, {3.673320216446509*^9, 
   3.673320222277959*^9}, {3.673347787292225*^9, 3.6733477905707607`*^9}, {
   3.673347850823167*^9, 3.673347864469767*^9}, {3.673348513306464*^9, 
   3.6733485262197742`*^9}, {3.673348583388249*^9, 3.6733485994567957`*^9}, {
   3.673348654276939*^9, 3.673348813502728*^9}, {3.67334884434271*^9, 
   3.673348852773514*^9}, {3.673348962073669*^9, 3.673348966968771*^9}, {
   3.67334914375578*^9, 3.673349161900428*^9}, {3.67334965597611*^9, 
   3.673349657727276*^9}, {3.673349775675026*^9, 3.673349777967917*^9}, {
   3.673349810608797*^9, 3.6733498135226803`*^9}, {3.6733500708850603`*^9, 
   3.673350089273899*^9}, {3.6733501396686296`*^9, 3.673350142620819*^9}, {
   3.673350208696312*^9, 3.673350213264668*^9}, {3.6733505161559563`*^9, 
   3.673350529969759*^9}, {3.673350573837124*^9, 3.673350630493663*^9}, {
   3.6733506706455*^9, 3.6733507040339203`*^9}, {3.673350765936203*^9, 
   3.673350806565501*^9}, {3.673350880404131*^9, 3.673350881376515*^9}, {
   3.673350937394993*^9, 3.6733509593001137`*^9}, {3.673351042659791*^9, 
   3.673351081473884*^9}, {3.673351241595724*^9, 3.673351299719163*^9}, {
   3.6733513326175823`*^9, 3.673351347775083*^9}, {3.673351503028063*^9, 
   3.6733515251521273`*^9}, {3.673351588142947*^9, 3.6733517489056473`*^9}, {
   3.673351784992189*^9, 3.6733517878698797`*^9}, {3.673351856886591*^9, 
   3.673351893697322*^9}, {3.673351941354895*^9, 3.673351971796022*^9}, {
   3.673352004291452*^9, 3.673352110234907*^9}, {3.673582002114897*^9, 
   3.673582021669859*^9}, {3.673582096889083*^9, 3.673582129880047*^9}, {
   3.673582551958288*^9, 3.6735826160775967`*^9}, {3.6735826473877172`*^9, 
   3.673582664562869*^9}, {3.673582732915288*^9, 3.6735828552135973`*^9}, {
   3.673582894087304*^9, 3.673582922131941*^9}, {3.673582980046156*^9, 
   3.673582982668253*^9}, {3.673583013606482*^9, 3.673583013921875*^9}, {
   3.67358311646111*^9, 3.673583146631547*^9}, {3.673583183176394*^9, 
   3.67358322385563*^9}, {3.673583316520307*^9, 3.67358336850852*^9}, {
   3.673583402341531*^9, 3.673583404435451*^9}, {3.673583621446084*^9, 
   3.673583622368494*^9}, {3.673583661906279*^9, 3.673583668418181*^9}, {
   3.67358370504458*^9, 3.673583706009583*^9}, {3.6735839509793663`*^9, 
   3.673584004647643*^9}, {3.673584055611472*^9, 3.673584091191173*^9}, {
   3.673584323952187*^9, 3.673584462744772*^9}, {3.673584521214593*^9, 
   3.673584556418111*^9}, {3.673584960625297*^9, 3.6735849620201807`*^9}, {
   3.673585150482872*^9, 3.673585163025827*^9}, {3.673585203830194*^9, 
   3.67358522145721*^9}, {3.6735852696276608`*^9, 3.673585313498968*^9}, {
   3.673585356626315*^9, 3.6735854354823427`*^9}, {3.673585483160884*^9, 
   3.673585523637842*^9}, {3.673585573342011*^9, 3.673585637544908*^9}, {
   3.673585930612484*^9, 3.673585954930513*^9}, {3.673586007950904*^9, 
   3.6735862787810593`*^9}, {3.673586334956378*^9, 3.6735863499045897`*^9}, {
   3.673588759032024*^9, 3.673588760142687*^9}, 3.673589121821281*^9, {
   3.673601360580217*^9, 3.673601361085075*^9}, {3.67360180719534*^9, 
   3.673601814700161*^9}, {3.673601974706924*^9, 3.673602011325775*^9}, {
   3.673602597791829*^9, 3.673602645823971*^9}, {3.673602676962037*^9, 
   3.67360268065177*^9}, {3.673602725890547*^9, 3.673602727647195*^9}, {
   3.673602771225533*^9, 3.6736028110038033`*^9}, 3.673602988605815*^9, {
   3.673603019074888*^9, 3.6736030298889236`*^9}, {3.673603074528542*^9, 
   3.6736030760411997`*^9}, {3.6736709141507607`*^9, 3.673671250025483*^9}, {
   3.673672009704382*^9, 3.6736720270549707`*^9}, {3.673672069974793*^9, 
   3.673672124556355*^9}, {3.6736721741702023`*^9, 3.6736722692680473`*^9}, {
   3.673672338583634*^9, 3.6736723524850616`*^9}, {3.6736725624685926`*^9, 
   3.673672638991617*^9}, {3.673672672034815*^9, 3.673672786357587*^9}, {
   3.6736728684304667`*^9, 3.6736730116558933`*^9}, {3.6736730530588284`*^9, 
   3.673673089660902*^9}, {3.67367312615657*^9, 3.6736732564683027`*^9}, {
   3.6736732943118477`*^9, 3.673673328204033*^9}, {3.6736733657784433`*^9, 
   3.6736735162410793`*^9}, {3.673673768880417*^9, 3.6736738649479723`*^9}, {
   3.673673900446563*^9, 3.673673901324574*^9}, {3.673674360714501*^9, 
   3.673674381909786*^9}, {3.673674428630866*^9, 3.6736744819405212`*^9}, {
   3.6736745861332006`*^9, 3.673674635074254*^9}, {3.673674711292871*^9, 
   3.673674716834918*^9}, 3.673834330831354*^9, {3.6738377332854958`*^9, 
   3.673837757642436*^9}, {3.6738377904463863`*^9, 3.673837792419422*^9}, {
   3.6740313432315474`*^9, 3.67403136235885*^9}, {3.674032178237646*^9, 
   3.674032180572288*^9}, {3.674032326611081*^9, 3.674032327778462*^9}, {
   3.674035601865307*^9, 3.674035613122026*^9}, {3.674035694240636*^9, 
   3.674035755277584*^9}, {3.6740358054553013`*^9, 3.674035826102854*^9}, {
   3.674035880525052*^9, 3.674035886256257*^9}, {3.675501623566112*^9, 
   3.6755016352320557`*^9}, {3.675501682068327*^9, 3.675501702938386*^9}, {
   3.675501866727309*^9, 3.6755019318092613`*^9}, {3.675507392048399*^9, 
   3.675507409903079*^9}, {3.675507832389669*^9, 3.675507954806819*^9}, {
   3.67550893687859*^9, 3.675508953147769*^9}, {3.675508996739156*^9, 
   3.675508998305839*^9}, {3.675509460468388*^9, 3.6755094732637367`*^9}, 
   3.6755639086697807`*^9, {3.675566310020853*^9, 3.675566337427299*^9}, {
   3.675567452205751*^9, 3.6755674883692293`*^9}, {3.675567581042338*^9, 
   3.675567634664363*^9}, {3.675567677111412*^9, 3.675567678994967*^9}, {
   3.675567767407445*^9, 3.675567827887166*^9}, {3.675567879049436*^9, 
   3.67556788174332*^9}, {3.675569179044211*^9, 3.675569212066084*^9}, {
   3.676859731373323*^9, 3.6768597393039093`*^9}, {3.676859784687284*^9, 
   3.6768598084377193`*^9}, {3.6768598526654654`*^9, 3.676859897803246*^9}, {
   3.676860080569284*^9, 3.676860110288907*^9}, {3.6768602146683083`*^9, 
   3.67686024947843*^9}, {3.676860279970636*^9, 3.676860319647203*^9}, {
   3.676861589810178*^9, 3.676861590705152*^9}, {3.6768616233701487`*^9, 
   3.6768616241284637`*^9}, {3.6768619908708487`*^9, 3.676861991874202*^9}, {
   3.676862096431284*^9, 3.6768620970897837`*^9}, {3.676863471352457*^9, 
   3.676863473618723*^9}, {3.676863799188869*^9, 3.676863799565021*^9}, {
   3.6768638545450983`*^9, 3.6768638582508163`*^9}, {3.6768638981181297`*^9, 
   3.676863949983045*^9}, {3.676882447315974*^9, 3.676882448777954*^9}, {
   3.676882648452023*^9, 3.676882648853595*^9}, {3.676882932282552*^9, 
   3.6768829625382338`*^9}, {3.6768834221829348`*^9, 3.676883428349901*^9}, 
   3.6768834850928097`*^9, {3.676883545797448*^9, 3.676883644738965*^9}, {
   3.676890365654561*^9, 3.676890391579184*^9}, {3.676890516727436*^9, 
   3.6768905312089157`*^9}, {3.6768988205565863`*^9, 3.676898884408329*^9}, 
   3.6769436116732473`*^9, {3.676943728715925*^9, 3.676943747081993*^9}, {
   3.6769482753141327`*^9, 3.6769482929368362`*^9}, {3.676948445858156*^9, 
   3.676948507383707*^9}, {3.676948564615361*^9, 3.676948711944044*^9}, {
   3.676948875182218*^9, 3.676949156139554*^9}, {3.676949240502193*^9, 
   3.676949255475421*^9}, {3.676949455773271*^9, 3.676949540680183*^9}, {
   3.67694960279173*^9, 3.676949693615498*^9}, {3.676949776871591*^9, 
   3.676949898742111*^9}, {3.676949939071035*^9, 3.676950097979725*^9}, {
   3.6769501300806723`*^9, 3.6769501535645437`*^9}, {3.676950368645441*^9, 
   3.6769506769349623`*^9}, {3.676950740386981*^9, 3.6769507688091793`*^9}, 
   3.6769508425978317`*^9, {3.676951078108629*^9, 3.676951079464178*^9}, {
   3.676952901745366*^9, 3.6769529083115253`*^9}, {3.676955425964402*^9, 
   3.676955445609263*^9}, {3.6769565960150948`*^9, 3.676956637871806*^9}, {
   3.6769567094606323`*^9, 3.6769567170826683`*^9}, {3.6769567557193403`*^9, 
   3.676956787757699*^9}, {3.676956819206469*^9, 3.676956822478224*^9}, {
   3.676957395571506*^9, 3.6769574240136642`*^9}, 3.67695823444208*^9, {
   3.676958277689067*^9, 3.676958277890119*^9}, {3.676958352007365*^9, 
   3.6769583566083508`*^9}, {3.67695852222713*^9, 3.676958544551124*^9}, {
   3.6769585760942287`*^9, 3.67695881655377*^9}, {3.676958859237585*^9, 
   3.67695887393567*^9}, {3.6770583136623487`*^9, 3.677058316010425*^9}, {
   3.677059705098958*^9, 3.6770597416188993`*^9}, {3.677059840328771*^9, 
   3.6770598671503057`*^9}, {3.677059905768568*^9, 3.6770599319993277`*^9}, {
   3.677208643309394*^9, 3.6772086514681473`*^9}, {3.677208934142207*^9, 
   3.6772089346129847`*^9}, {3.6772127931663094`*^9, 
   3.6772127948215017`*^9}, {3.677213152199287*^9, 3.677213166289937*^9}, {
   3.677217338437573*^9, 3.677217363942561*^9}, {3.677217435771283*^9, 
   3.677217436209476*^9}, {3.677217599301632*^9, 3.67721760169271*^9}, {
   3.677217795235471*^9, 3.6772178108447104`*^9}, {3.6772179382415533`*^9, 
   3.6772179386740932`*^9}, {3.677290113783099*^9, 3.677290115453239*^9}, {
   3.677290447096436*^9, 3.677290457533052*^9}, {3.677291620617909*^9, 
   3.677291622431859*^9}, {3.677291791844191*^9, 3.677291792842559*^9}, {
   3.6772943757857656`*^9, 3.6772943770241537`*^9}, {3.677294543143445*^9, 
   3.677294543951027*^9}, {3.677294755089802*^9, 3.677294762247367*^9}, {
   3.677295674592388*^9, 3.6772956838819447`*^9}, {3.6772965453634768`*^9, 
   3.677296547653129*^9}, {3.677300267193173*^9, 3.677300269847192*^9}, {
   3.677303535571476*^9, 3.677303540249207*^9}, {3.677303935927198*^9, 
   3.677303940486445*^9}, {3.677305016641206*^9, 3.6773050281153793`*^9}, {
   3.67730570722291*^9, 3.677305713797048*^9}, {3.677305761960881*^9, 
   3.6773057673766937`*^9}, {3.677305837362328*^9, 3.677305837807687*^9}, 
   3.6773071714114447`*^9, {3.67730721865969*^9, 3.677307219757214*^9}, {
   3.677401594991919*^9, 3.677401619688919*^9}, {3.6774018046337013`*^9, 
   3.6774018053638487`*^9}, {3.677402482655986*^9, 3.677402484152034*^9}, {
   3.677404804296954*^9, 3.677404804449424*^9}, {3.677408267984231*^9, 
   3.677408268672779*^9}, {3.6774088338695173`*^9, 3.677408834556635*^9}, {
   3.6774116369267282`*^9, 3.6774116428755207`*^9}, {3.677496102450539*^9, 
   3.677496110876062*^9}, {3.677496178932189*^9, 3.6774963278039293`*^9}, {
   3.67749637634433*^9, 3.677496427152042*^9}, {3.6774964700149603`*^9, 
   3.677496587311717*^9}, {3.6774966407786694`*^9, 3.677496649769548*^9}, {
   3.677496689956715*^9, 3.677496786950028*^9}, {3.677496823458406*^9, 
   3.677496874791449*^9}, {3.677497237016492*^9, 3.677497305036149*^9}, 
   3.677497695749888*^9, {3.6774981067563963`*^9, 3.677498112549488*^9}, {
   3.6775554321100883`*^9, 3.677555443344153*^9}, {3.67755550068007*^9, 
   3.677555792970305*^9}, {3.6775656041525908`*^9, 3.67756569644101*^9}, {
   3.677565893737895*^9, 3.6775658954384604`*^9}, {3.6793739318283253`*^9, 
   3.679374008129668*^9}, {3.679374157961121*^9, 3.6793741736797733`*^9}, {
   3.6793742119213257`*^9, 3.679374230079462*^9}, {3.679374300704142*^9, 
   3.679374325081181*^9}, {3.6793743565307617`*^9, 3.6793743602318068`*^9}, {
   3.679374590230297*^9, 3.679374597497225*^9}, {3.679383176808629*^9, 
   3.679383177105088*^9}, {3.6793844307228127`*^9, 3.679384432052703*^9}, {
   3.679385468973962*^9, 3.679385470117977*^9}, {3.6796678686246634`*^9, 
   3.6796678886759567`*^9}, {3.679667943779858*^9, 3.67966800302264*^9}, {
   3.679668099619061*^9, 3.679668119080619*^9}, {3.679668149941272*^9, 
   3.6796681855869703`*^9}, {3.67966902826639*^9, 3.679669037369864*^9}, {
   3.6796691708618526`*^9, 3.6796691983403683`*^9}, {3.679669306057571*^9, 
   3.67966931723304*^9}, {3.679670086286521*^9, 3.679670145997733*^9}, {
   3.679670423983828*^9, 3.6796704294889*^9}, {3.6796706640739183`*^9, 
   3.6796706656412563`*^9}, {3.67967086466826*^9, 3.679670875492581*^9}, {
   3.679670947713945*^9, 3.6796709488656893`*^9}, {3.679671018040856*^9, 
   3.679671018585023*^9}, {3.679671061050601*^9, 3.679671087100115*^9}, {
   3.679712013212714*^9, 3.679712099860277*^9}, {3.6797121615192327`*^9, 
   3.679712364545245*^9}, {3.67971951184415*^9, 3.679719512939116*^9}, {
   3.679719817238249*^9, 3.679719818748744*^9}, {3.679719866180938*^9, 
   3.679719876068009*^9}, {3.679719964051299*^9, 3.6797199739381323`*^9}, {
   3.679720031903934*^9, 3.679720032247087*^9}, {3.679720474231535*^9, 
   3.6797205034524593`*^9}, {3.679721209503811*^9, 3.679721218295678*^9}, {
   3.6797296730605307`*^9, 3.6797297295774527`*^9}, {3.679730671647793*^9, 
   3.679730676495865*^9}, {3.679730799066113*^9, 3.679730812896736*^9}, {
   3.679731259107078*^9, 3.679731259401271*^9}, {3.6797326114761887`*^9, 
   3.679732712766626*^9}, {3.679735138822052*^9, 3.679735139325603*^9}, {
   3.679735606601102*^9, 3.679735607312517*^9}, {3.679735802153075*^9, 
   3.679735810127905*^9}, {3.679735958347064*^9, 3.679735962681569*^9}, {
   3.67973607865696*^9, 3.6797360898282433`*^9}, {3.679736388306772*^9, 
   3.679736392153192*^9}, {3.6797365533087673`*^9, 3.6797365543396883`*^9}, {
   3.679736711770005*^9, 3.6797367186966953`*^9}, {3.679736988181982*^9, 
   3.679736989011251*^9}, {3.679737509964802*^9, 3.679737512411639*^9}, {
   3.679739615638596*^9, 3.6797396193965273`*^9}, {3.679739657131919*^9, 
   3.679739657458736*^9}, {3.6797397596258307`*^9, 3.67973976043223*^9}, {
   3.6797398027105923`*^9, 3.679739804493527*^9}, {3.679739912063715*^9, 
   3.679739922821795*^9}, {3.679740922230639*^9, 3.679740927086686*^9}, {
   3.6797410659288883`*^9, 3.679741093637721*^9}, {3.67974162993618*^9, 
   3.679741630519239*^9}, {3.6797417038558826`*^9, 3.679741705687375*^9}, {
   3.679741807212771*^9, 3.679741848988531*^9}, {3.679741889915539*^9, 
   3.67974189183401*^9}, {3.679742385686372*^9, 3.679742388086224*^9}, {
   3.6797446770079823`*^9, 3.6797446776800413`*^9}, {3.6797448123529997`*^9, 
   3.679744813144162*^9}, {3.6797448502648973`*^9, 3.679744850544059*^9}, {
   3.679745297517173*^9, 3.6797453093649073`*^9}, {3.6797522417206373`*^9, 
   3.679752242152238*^9}, {3.679752305646874*^9, 3.679752310125514*^9}, {
   3.6797523681810303`*^9, 3.679752370085061*^9}, {3.679752431711719*^9, 
   3.6797524353903437`*^9}, {3.6797524694362907`*^9, 3.679752529238559*^9}, {
   3.679752654428361*^9, 3.679752684473509*^9}, {3.679752788113449*^9, 
   3.6797528239614353`*^9}, {3.6797532343608294`*^9, 
   3.6797532403445807`*^9}, {3.6797534378106747`*^9, 
   3.6797534466259327`*^9}, {3.679753622663928*^9, 3.679753623456045*^9}, {
   3.6797538023086567`*^9, 3.6797538309390783`*^9}, {3.6799729604556093`*^9, 
   3.679972986975512*^9}, {3.679973043675376*^9, 3.679973240246763*^9}, {
   3.679973315418454*^9, 3.67997333966371*^9}, {3.679973382194214*^9, 
   3.679973382770956*^9}, {3.6799737464937963`*^9, 3.6799737647159777`*^9}, {
   3.679973847909031*^9, 3.6799738640978413`*^9}, {3.6799739780485783`*^9, 
   3.679973983376292*^9}, {3.679974837075654*^9, 3.679974837668171*^9}, {
   3.679975010449362*^9, 3.67997501954452*^9}, {3.679975070464281*^9, 
   3.6799750724376802`*^9}, {3.679975285190556*^9, 3.679975288898262*^9}, {
   3.679977763443128*^9, 3.679977768066414*^9}, {3.679977909095285*^9, 
   3.6799779120543947`*^9}, {3.680234083798943*^9, 3.680234155883299*^9}, {
   3.680235313638205*^9, 3.680235337084441*^9}, {3.680235374020566*^9, 
   3.6802354560341587`*^9}, {3.680235547571641*^9, 3.6802356538679237`*^9}, {
   3.680235836805129*^9, 3.68023587751334*^9}, {3.680235910060791*^9, 
   3.680235941596058*^9}, {3.6802379911232224`*^9, 3.6802379946279984`*^9}, {
   3.680238132086974*^9, 3.680238133381957*^9}, {3.68023816856654*^9, 
   3.6802381843422623`*^9}, {3.6802386478523073`*^9, 3.680238667174779*^9}, {
   3.680240327311513*^9, 3.680240327958004*^9}, {3.6802409508746853`*^9, 
   3.680240951289276*^9}, {3.680241058127283*^9, 3.6802410645829897`*^9}, {
   3.68024795233173*^9, 3.6802479530755463`*^9}, {3.6802480127823353`*^9, 
   3.6802480175896397`*^9}, {3.680248711545205*^9, 3.680248713136096*^9}, {
   3.6803167661290607`*^9, 3.680316766408823*^9}, {3.680317646003941*^9, 
   3.6803176701851187`*^9}, {3.680317715459997*^9, 3.680317718665833*^9}, {
   3.68031776378059*^9, 3.6803177639862757`*^9}, {3.6803303666722183`*^9, 
   3.680330381852439*^9}, {3.6804074120055323`*^9, 3.680407418962851*^9}, {
   3.680408318656282*^9, 3.680408318951159*^9}, {3.68040852107261*^9, 
   3.6804085217516003`*^9}, {3.680410220685656*^9, 3.68041022146734*^9}, {
   3.680410437158697*^9, 3.680410440821054*^9}, {3.6804104831977463`*^9, 
   3.680410484147492*^9}, {3.680410765519266*^9, 3.680410781667148*^9}, {
   3.680411321103449*^9, 3.680411339613131*^9}, {3.680423685396661*^9, 
   3.6804236896180067`*^9}, {3.6804239227962713`*^9, 3.680423927184566*^9}, {
   3.68042401777153*^9, 3.680424037023905*^9}, {3.680424104685503*^9, 
   3.680424104941423*^9}, {3.680426315425378*^9, 3.680426320814867*^9}, {
   3.6804272406648808`*^9, 3.680427248662834*^9}, {3.6804273046735487`*^9, 
   3.6804273241274443`*^9}, {3.680427575989352*^9, 3.6804275814280453`*^9}, {
   3.6804925541822023`*^9, 3.680492554548088*^9}, {3.680493017938363*^9, 
   3.680493018623578*^9}, {3.680493519974454*^9, 3.6804935880765333`*^9}, {
   3.680493795495264*^9, 3.680493809115308*^9}, {3.680493860554388*^9, 
   3.68049387461649*^9}, {3.680494033451008*^9, 3.680494046223081*^9}, {
   3.680502813328703*^9, 3.680502826941106*^9}, {3.6805069674650507`*^9, 
   3.680506968830449*^9}, {3.680574088226233*^9, 3.680574088358163*^9}, {
   3.680575985250491*^9, 3.680576041227684*^9}, {3.6805760877868443`*^9, 
   3.6805760892951612`*^9}, {3.680576224091905*^9, 3.680576224859255*^9}, {
   3.680576289952054*^9, 3.680576290078505*^9}, {3.680576500829987*^9, 
   3.6805765029011374`*^9}, {3.680576765323595*^9, 3.6805767662321463`*^9}, {
   3.6805769154688387`*^9, 3.680576955567078*^9}, {3.6805785908106537`*^9, 
   3.680578606825605*^9}, {3.680578677044444*^9, 3.6805786774897947`*^9}, {
   3.680578793704323*^9, 3.680578793855419*^9}, {3.680594913928586*^9, 
   3.680594915454815*^9}, {3.680594989848464*^9, 3.68059498999708*^9}, {
   3.6805950256462593`*^9, 3.680595027220092*^9}, {3.680595246667944*^9, 
   3.6805952753871737`*^9}, {3.680595333161911*^9, 3.680595394428406*^9}, {
   3.6805954339846563`*^9, 3.680595434262779*^9}, {3.680595467703454*^9, 
   3.680595467974374*^9}, {3.68059589059338*^9, 3.680595917615549*^9}, {
   3.680595964293919*^9, 3.6805960003473673`*^9}, {3.680596031504264*^9, 
   3.6805961211719027`*^9}, {3.680600967648802*^9, 3.68060100459261*^9}, 
   3.680601071324554*^9, {3.6806011841324263`*^9, 3.680601236079565*^9}, {
   3.680601268845419*^9, 3.680601272354766*^9}, {3.680601645669773*^9, 
   3.680601661243782*^9}, {3.6806017130369587`*^9, 3.680601725314028*^9}, {
   3.680601833427479*^9, 3.680601853022312*^9}, {3.680601899977194*^9, 
   3.680601936506125*^9}, {3.6806019746938753`*^9, 3.680601981910228*^9}, {
   3.680602048495489*^9, 3.680602048891361*^9}, {3.680602134473349*^9, 
   3.680602136924325*^9}, {3.6806021736249*^9, 3.6806022644508266`*^9}, {
   3.680602307578245*^9, 3.680602339137836*^9}, {3.680602376992716*^9, 
   3.6806024093172197`*^9}, {3.680602882402369*^9, 3.680602883417315*^9}, {
   3.680605284679205*^9, 3.680605285035224*^9}, {3.6806053712271976`*^9, 
   3.680605371840324*^9}, {3.680605500908121*^9, 3.680605505273624*^9}, {
   3.680605692728664*^9, 3.6806056928631163`*^9}, {3.680605731815658*^9, 
   3.6806057333481627`*^9}, {3.68060579726261*^9, 3.680605798826823*^9}, {
   3.680605941393777*^9, 3.680605942648509*^9}, {3.680607198183516*^9, 
   3.680607198852273*^9}, {3.68060845440347*^9, 3.680608454839747*^9}, {
   3.6806088253172693`*^9, 3.6806088257711067`*^9}, {3.680608961750811*^9, 
   3.680608961957003*^9}, {3.680609086600534*^9, 3.680609087529826*^9}, {
   3.680845932847752*^9, 3.6808460441876097`*^9}, {3.680846104983761*^9, 
   3.680846105908354*^9}, {3.680846297701898*^9, 3.680846298459243*^9}, {
   3.680847108165556*^9, 3.68084717572558*^9}, {3.680847222022935*^9, 
   3.68084724653125*^9}, {3.680855350600391*^9, 3.680855427211042*^9}, {
   3.6808554692129097`*^9, 3.680855511366036*^9}, {3.680931701931466*^9, 
   3.680931702256193*^9}, {3.680932274909048*^9, 3.680932275603545*^9}, {
   3.681014719564736*^9, 3.6810147826586637`*^9}, {3.6810149918995323`*^9, 
   3.6810150837487173`*^9}, {3.6810151959223013`*^9, 3.681015220682261*^9}, {
   3.681015309362301*^9, 3.681015412995076*^9}, {3.681015967535124*^9, 
   3.6810159745193653`*^9}, 3.68101603851585*^9, 3.681028263194921*^9, {
   3.6810286659298153`*^9, 3.681028724270179*^9}, {3.681028838730538*^9, 
   3.681028839185177*^9}, {3.681029113733062*^9, 3.681029141800969*^9}, 
   3.681029248023581*^9, {3.681029282597978*^9, 3.681029308053686*^9}, {
   3.681029972346118*^9, 3.681029973751985*^9}, {3.6810316078469753`*^9, 
   3.6810316091783047`*^9}, {3.6810322472883*^9, 3.681032250019165*^9}, {
   3.6810948123756733`*^9, 3.681094812683464*^9}, {3.681094964896563*^9, 
   3.6810949771572742`*^9}, {3.6810951673826933`*^9, 
   3.6810951677052917`*^9}, {3.681102059828622*^9, 3.681102060784833*^9}, {
   3.6811021597493258`*^9, 3.6811021615060873`*^9}, {3.681104485763207*^9, 
   3.68110449122729*^9}, {3.681105409548643*^9, 3.681105409865656*^9}, {
   3.681106322128468*^9, 3.681106322604937*^9}, {3.681106573207242*^9, 
   3.6811065765493193`*^9}, {3.681178007930645*^9, 3.6811780162096786`*^9}, {
   3.681178161868554*^9, 3.681178168922757*^9}, {3.681179025406887*^9, 
   3.6811790262914743`*^9}, {3.681179524430258*^9, 3.681179525356948*^9}, {
   3.681180362575748*^9, 3.6811803635010967`*^9}, {3.681182507000596*^9, 
   3.681182507933755*^9}, {3.681182653300406*^9, 3.681182661770546*^9}, 
   3.681183993940168*^9, {3.6811846791933193`*^9, 3.681184680053504*^9}, {
   3.681185341461403*^9, 3.68118534809406*^9}, {3.68118859790635*^9, 
   3.68118859819273*^9}, 3.6811911326768417`*^9, {3.681192815376264*^9, 
   3.681192816356513*^9}, {3.6811939816440983`*^9, 3.68119399609905*^9}, {
   3.6812004382976427`*^9, 3.681200438563797*^9}, {3.681200481399871*^9, 
   3.681200488541008*^9}, {3.6812007354581614`*^9, 3.681200740654331*^9}, {
   3.681201267550727*^9, 3.6812012676514187`*^9}, {3.6812021685619793`*^9, 
   3.681202176390608*^9}, {3.681202236023211*^9, 3.6812022369066477`*^9}, {
   3.68120227620816*^9, 3.68120227661902*^9}, {3.681208221858633*^9, 
   3.6812082327356043`*^9}, {3.681208264514361*^9, 3.681208294178857*^9}, {
   3.6812085633531523`*^9, 3.6812086123952*^9}, {3.6812086625286827`*^9, 
   3.681208693270527*^9}, {3.681208773470829*^9, 3.681208789235532*^9}, {
   3.681208890051557*^9, 3.681208956656303*^9}, {3.681274159442113*^9, 
   3.681274160148387*^9}, {3.6812751559668818`*^9, 3.6812751590977163`*^9}, {
   3.681275311339333*^9, 3.6812753544368773`*^9}, {3.6812753941335297`*^9, 
   3.681275453964642*^9}, 3.681275785183269*^9, {3.6812773398086452`*^9, 
   3.681277340299597*^9}, {3.681277387418846*^9, 3.681277418297377*^9}, {
   3.6812867219805117`*^9, 3.681286722959077*^9}, {3.681286841912651*^9, 
   3.6812868458579063`*^9}, {3.681286989440899*^9, 3.6812869902101097`*^9}, {
   3.681287265855343*^9, 3.6812873023905983`*^9}, {3.6812873525445423`*^9, 
   3.681287353657483*^9}, {3.681287562948969*^9, 3.681287574815982*^9}, {
   3.681287605977364*^9, 3.681287875979683*^9}, {3.681287999838459*^9, 
   3.681288262354664*^9}, {3.6812917600307283`*^9, 3.68129176581462*^9}, {
   3.681461860945573*^9, 3.681461879448536*^9}, {3.681463961368648*^9, 
   3.681464007915344*^9}, {3.6814641035761003`*^9, 3.681464107634863*^9}, {
   3.681464216433826*^9, 3.681464216913266*^9}, {3.6814691525000267`*^9, 
   3.6814691534822283`*^9}, {3.681525121132537*^9, 3.681525136207494*^9}, {
   3.681528634297777*^9, 3.6815287376685038`*^9}, {3.681528775167094*^9, 
   3.681528781577313*^9}, {3.681528834323226*^9, 3.681528992928911*^9}, {
   3.681634208486912*^9, 3.681634209799254*^9}, {3.681635603325708*^9, 
   3.6816356042105713`*^9}, {3.69122327540044*^9, 3.691223749447855*^9}, {
   3.69122378291505*^9, 3.691223881899096*^9}, {3.6912239397085247`*^9, 
   3.6912240670868692`*^9}, {3.69122417148761*^9, 3.691224187917046*^9}, {
   3.6912243301779013`*^9, 3.6912243769846907`*^9}, {3.691224407802617*^9, 
   3.6912244119740133`*^9}, {3.691224446909396*^9, 3.691224448426468*^9}, {
   3.691224544758706*^9, 3.691224547207732*^9}, {3.691224624473064*^9, 
   3.691224848905053*^9}, {3.691224879039631*^9, 3.6912248794418173`*^9}, {
   3.691225662799534*^9, 3.6912256633734493`*^9}, {3.691225771353492*^9, 
   3.6912258026796513`*^9}, {3.691225900721087*^9, 3.691225914704299*^9}, {
   3.691226009649784*^9, 3.6912260489296827`*^9}, {3.691226178793199*^9, 
   3.691226187337331*^9}, {3.691226252043016*^9, 3.691226313608409*^9}, {
   3.69122635959041*^9, 3.6912264037153187`*^9}, {3.691226561465358*^9, 
   3.6912266046126223`*^9}, {3.6912266486924467`*^9, 3.691226697684407*^9}, {
   3.691226769904962*^9, 3.691226812198824*^9}, {3.6912268544030733`*^9, 
   3.691226885581493*^9}, {3.691226919983803*^9, 3.6912269335823517`*^9}, {
   3.691226989840363*^9, 3.691227035841642*^9}, {3.691227248264483*^9, 
   3.691227380682332*^9}, {3.6912288578765297`*^9, 3.6912289613248177`*^9}, {
   3.6912291046622343`*^9, 3.691229106160026*^9}, {3.691229167663218*^9, 
   3.691229205699958*^9}, {3.691229259055937*^9, 3.691229280649921*^9}, {
   3.69122932068215*^9, 3.6912293341270638`*^9}, {3.691229394300027*^9, 
   3.691229398509506*^9}, {3.691229429639708*^9, 3.691229561503428*^9}, {
   3.691229608889496*^9, 3.691229609357676*^9}, {3.691229651988152*^9, 
   3.6912296751196747`*^9}, {3.691230012227936*^9, 3.691230050571537*^9}, {
   3.6912300910450983`*^9, 3.691230102536337*^9}, {3.6912301626516743`*^9, 
   3.691230176249866*^9}, {3.691230218231505*^9, 3.6912302546831627`*^9}, {
   3.6912303470349083`*^9, 3.691230352378566*^9}, {3.691230408377087*^9, 
   3.691230579329813*^9}, {3.6912315993632097`*^9, 3.6912316320145197`*^9}, {
   3.691232584886279*^9, 3.691232765077569*^9}, {3.6912328240130377`*^9, 
   3.69123290444662*^9}, {3.6912345727411003`*^9, 3.691234603771143*^9}, {
   3.691323457331002*^9, 3.691323494890946*^9}, {3.6913237782780943`*^9, 
   3.691323783117269*^9}, {3.691406951086973*^9, 3.691406965450732*^9}, {
   3.691407137922279*^9, 3.691407143011861*^9}, {3.691474047993664*^9, 
   3.6914740970675507`*^9}, {3.691474228476622*^9, 3.691474532034802*^9}, {
   3.691474562161208*^9, 3.6914747174610043`*^9}, {3.6914747493777742`*^9, 
   3.691474784260419*^9}, {3.691474825443574*^9, 3.69147502826654*^9}, {
   3.6914750653699017`*^9, 3.691475074560606*^9}, {3.691475166638241*^9, 
   3.691475188045021*^9}, {3.6914752802128277`*^9, 3.691475302045661*^9}, {
   3.691475341810566*^9, 3.691475357168486*^9}, {3.691475388151094*^9, 
   3.6914753982058487`*^9}, {3.691475430922874*^9, 3.69147543277953*^9}, {
   3.6914754996739264`*^9, 3.691475580774613*^9}, {3.6914756654905167`*^9, 
   3.691475676628763*^9}, {3.691475864240135*^9, 3.691475866645144*^9}, {
   3.691483669324698*^9, 3.691483723477089*^9}, {3.7177500117324142`*^9, 
   3.7177500120538263`*^9}}],

Cell[BoxData[
 TemplateBox[{GraphicsBox[
    GraphicsComplexBox[CompressedData["
1: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
W8Dh7/wG4vnp82PG/SDm6X77H69k0Z0=
     "], {{{}, {
        Hue[0.67, 0.6, 0.6], 
        Opacity[0.2], 
        EdgeForm[None], 
        GraphicsGroupBox[
         PolygonBox[CompressedData["
1:eJwVz0tLQgEUhdFralqWWfYwM+32ttJSUCgCRYIiQlQiTEjiItWo/v+s5WBx
zh5+YfQ3+l0IgiDGgHeWjQxN/w8TvugzZsYDL7wRcU+PZ175pM0dXZ4YMaXB
DdfUqXHFJRdUOeeMU0445ohDQg6oUGafEnsU2aXADttssUmeDdbJsUZ23q51
1V0hM+9niTQpFkmSoMUtHR4Z8kGcb/4BVqkQFw==
          "]]]}, {}, {
        Hue[0.9060679774997897, 0.6, 0.6], 
        Opacity[0.2], 
        EdgeForm[None], 
        GraphicsGroupBox[
         PolygonBox[{{236, 264, 265, 199, 254, 218, 241, 167, 202, 221, 244, 
          177, 191, 210, 233, 120, 171, 181, 195, 214, 237, 160, 166, 176, 
          190, 209, 232, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 
          159, 165, 175, 189, 208, 231, 109, 186, 200, 219, 242, 170, 203, 
          222, 245, 180, 226, 249, 194, 253, 
          213}}]]}, {}, {}, {}, {}, {}, {}}, {{}, {}, {
        Hue[0.67, 0.6, 0.6], 
        LineBox[{1, 91, 79, 69, 61, 55, 51, 2, 92, 80, 70, 62, 56, 52, 95, 83,
          73, 65, 59, 97, 85, 75, 67, 99, 87, 77, 101}], 
        LineBox[CompressedData["
1:eJwt0EtLAgEAhdEZsiwrzUrLLGuyh71MA4UiMCJIRAKHkBKKGCRd6f/fdRYt
Dt/uLm6UzONZGATBG59MWOCLAa90uKdFikWWSLPMChlWWWOd0GhWc2yQZ5Mt
tilQZIddSuxRZp8DKhxyRMQxVU445YxzalxwyRXX3FDnlgZNvonp8sQDbX54
p8czjyQM6fPCmI//n34ZMeWOP2ZvD/w=
         "]]}, {
        Hue[0.9060679774997897, 0.6, 0.6], 
        LineBox[{108, 230, 207, 188, 174, 164, 240, 217, 198, 184, 246, 223, 
         204, 251, 228, 255, 158}], 
        LineBox[{236, 213, 253, 194, 249, 226, 180, 245, 222, 203, 170, 242, 
         219, 200, 186, 109, 231, 208, 189, 175, 165, 159, 110, 111, 112, 113,
          114, 115, 116, 117, 118, 119, 232, 209, 190, 176, 166, 160, 237, 
         214, 195, 181, 171, 120, 233, 210, 191, 177, 244, 221, 202, 167, 241,
          218, 254, 199}], 
        LineBox[CompressedData["
1:eJwN0KtOggEAgNGfR/F9SDwCD6AZL4ggCl6Q+0U0qEU2LLDhnAU2DAYssGkg
6JwFNwgEnDN4wtnXv7XoRmQ9FARBmF8+eWDFOyOumPPKkB5tYswY06fDLdds
ssU2O8TZJcEeSVLsk+aAQzJkOeKYE07JcUaeAkVKlKlQpUadBuc0ueCbCQO6
tLhhwRtP3HPHkinPPPLDBy/88UVg2KX8A8LQNKE=
         "]]}, {
        Hue[0.67, 0.6, 0.6], 
        Opacity[0.2], 
        LineBox[{106, 107, 105}], 
        LineBox[{259, 262, 258}], 
        LineBox[{261, 263, 260}]}}, {{}, {}, {}, {}}}], AspectRatio -> 
    NCache[GoldenRatio^(-1), 0.6180339887498948], Axes -> True, 
    AxesLabel -> {None, None}, AxesOrigin -> {0, 0}, 
    Method -> {"AxesInFront" -> True}, PlotRange -> {All, All}, 
    PlotRangeClipping -> True, PlotRangePadding -> {Automatic, Automatic}],
   TemplateBox[{"\"Hedonic income in A\"", "\"Hedonic income in B\""}, 
    "LineLegend", DisplayFunction -> (StyleBox[
      StyleBox[
       PaneBox[
        TagBox[
         GridBox[{{
            TagBox[
             GridBox[{{
                GraphicsBox[{{
                   Directive[
                    EdgeForm[{
                    Opacity[0.3], 
                    GrayLevel[0]}], 
                    Hue[0.67, 0.6, 0.6]], {
                    LineBox[{{0, 10}, {20, 10}}]}}, {
                   Directive[
                    EdgeForm[{
                    Opacity[0.3], 
                    GrayLevel[0]}], 
                    Hue[0.67, 0.6, 0.6]], {}}}, AspectRatio -> Full, 
                 ImageSize -> {20, 10}, PlotRangePadding -> None, 
                 ImagePadding -> 1, 
                 BaselinePosition -> (Scaled[0.1] -> Baseline)], #}, {
                GraphicsBox[{{
                   Directive[
                    EdgeForm[{
                    Opacity[0.3], 
                    GrayLevel[0]}], 
                    Hue[0.9060679774997897, 0.6, 0.6]], {
                    LineBox[{{0, 10}, {20, 10}}]}}, {
                   Directive[
                    EdgeForm[{
                    Opacity[0.3], 
                    GrayLevel[0]}], 
                    Hue[0.9060679774997897, 0.6, 0.6]], {}}}, AspectRatio -> 
                 Full, ImageSize -> {20, 10}, PlotRangePadding -> None, 
                 ImagePadding -> 1, 
                 BaselinePosition -> (Scaled[0.1] -> Baseline)], #2}}, 
              GridBoxAlignment -> {
               "Columns" -> {Center, Left}, "Rows" -> {{Baseline}}}, 
              AutoDelete -> False, 
              GridBoxDividers -> {
               "Columns" -> {{False}}, "Rows" -> {{False}}}, 
              GridBoxItemSize -> {"Columns" -> {{All}}, "Rows" -> {{All}}}, 
              GridBoxSpacings -> {"Columns" -> {{0.5}}, "Rows" -> {{0.8}}}], 
             "Grid"]}}, 
          GridBoxAlignment -> {"Columns" -> {{Left}}, "Rows" -> {{Top}}}, 
          AutoDelete -> False, 
          GridBoxItemSize -> {
           "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}, 
          GridBoxSpacings -> {"Columns" -> {{1}}, "Rows" -> {{0}}}], "Grid"], 
        Alignment -> Left, AppearanceElements -> None, 
        ImageMargins -> {{5, 5}, {5, 5}}, ImageSizeAction -> "ResizeToFit"], 
       LineIndent -> 0, StripOnInput -> False], {FontFamily -> "Times"}, 
      Background -> Automatic, StripOnInput -> False]& ), Editable -> True, 
    InterpretationFunction :> (RowBox[{"LineLegend", "[", 
       RowBox[{
         RowBox[{"{", 
           RowBox[{
             RowBox[{"Directive", "[", 
               RowBox[{"Hue", "[", 
                 RowBox[{"0.67`", ",", "0.6`", ",", "0.6`"}], "]"}], "]"}], 
             ",", 
             RowBox[{"Directive", "[", 
               RowBox[{"Hue", "[", 
                 RowBox[{"0.9060679774997897`", ",", "0.6`", ",", "0.6`"}], 
                 "]"}], "]"}]}], "}"}], ",", 
         RowBox[{"{", 
           RowBox[{#, ",", #2}], "}"}], ",", 
         RowBox[{"LegendLayout", "\[Rule]", "\"Column\""}]}], "]"}]& )]},
  "Legended",
  DisplayFunction->(GridBox[{{
      TagBox[
       ItemBox[
        PaneBox[
         TagBox[#, "SkipImageSizeLevel"], Alignment -> {Center, Baseline}, 
         BaselinePosition -> Baseline], DefaultBaseStyle -> "Labeled"], 
       "SkipImageSizeLevel"], 
      ItemBox[#2, DefaultBaseStyle -> "LabeledLabel"]}}, 
    GridBoxAlignment -> {"Columns" -> {{Center}}, "Rows" -> {{Center}}}, 
    AutoDelete -> False, GridBoxItemSize -> Automatic, 
    BaselinePosition -> {1, 1}]& ),
  Editable->True,
  InterpretationFunction->(RowBox[{"Legended", "[", 
     RowBox[{#, ",", 
       RowBox[{"Placed", "[", 
         RowBox[{#2, ",", "After"}], "]"}]}], "]"}]& )]], "Output",
 CellChangeTimes->{3.6914775620010157`*^9}],

Cell[BoxData[
 TagBox[GridBox[{
    {"\<\"Stage 0: Mean income in A and B:\"\>", "9.`"},
    {"\<\"Stage 0: Median hedonic income in A:\"\>", "8.029437251522857`"},
    {"\<\"Stage 0: Median hedonic income in B:\"\>", "2.0073593128807143`"},
    {"\<\"Stage 0: Majority tax rates in A (without migration):\"\>", 
     "0.1245417292239678`"},
    {"\<\"Stage 0: Majority tax rates in B (without migration):\"\>", 
     "0.4981669168958712`"}
   },
   GridBoxAlignment->{
    "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
     "RowsIndexed" -> {}},
   GridBoxSpacings->{"Columns" -> {
       Offset[0.27999999999999997`], {
        Offset[2.0999999999999996`]}, 
       Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
       Offset[0.2], {
        Offset[0.4]}, 
       Offset[0.2]}, "RowsIndexed" -> {}}],
  Function[BoxForm`e$, 
   TableForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{3.69147756200174*^9}]
}, Open  ]]
},
WindowSize->{1339, 690},
WindowMargins->{{Automatic, 30}, {Automatic, 0}},
PrintingCopies->1,
PrintingPageRange->{1, Automatic},
FrontEndVersion->"9.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (January 25, \
2013)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 77644, 1534, 1950, "Input"],
Cell[78226, 1558, 10326, 205, 237, "Output"],
Cell[88555, 1765, 953, 22, 97, "Output"]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
